<?php

if(check_member_login()||$params[1]==$CONFIG_MEMBER_LINK['send-pass']||$params[1]==$CONFIG_MEMBER_LINK['send-confirm']||$params[1]==$CONFIG_MEMBER_LINK['change-pass-mail']) {
    switch($params[1]) {
        case $CONFIG_MEMBER_LINK['login']: {
                include "member_login.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['logout']: {
                include "member_logout.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['send-pass']: {
                include "member_send_pass.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['send-confirm']: {
                include "member_send_confirm.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['change-pass-mail']: {
                include "member_change_pass.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['edit-post-property-step1']: {
                if(isset($params[2]) && intval($params[2])>0) {

                    $_SESSION['mem_property_id'] = intval($params[2]);
                }
                include_once SITE_MODULE_DIR.'/member/functions/post-property-functions.php';
                include "post_property_step1.php";
                break;
		}case
        $CONFIG_MEMBER_LINK['edit-posted-property']: {
                if(isset($params[2]) && intval($params[2])>0) {

                    $_SESSION['mem_property_id'] = intval($params[2]);
                }
                include_once SITE_MODULE_DIR.'/member/functions/post-property-functions.php';
                include "edit_posted_property.php";
                break;
        }case
        $CONFIG_MEMBER_LINK['post-property']: {
                unset($_SESSION['mem_property_id']);
                if(isset($params[2]) && intval($params[2])>0) {
                    $_SESSION['mem_property_id'] = intval($params[2]);
                }
                include_once SITE_MODULE_DIR.'/member/functions/post-property-functions.php';
                include "post_property_step1.php";
                break;
        }case


        $CONFIG_MEMBER_LINK['post-property-success']: {
                include "post_property_success.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['manage-draft-property']: {
                include_once SITE_MODULE_DIR.'/member/functions/manage-property-functions.php';
                include "manage-draft-property.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['manage-posted-property']: {
                include_once SITE_MODULE_DIR.'/member/functions/manage-property-functions.php';
                include "manage-posted-property.php";
                break;
        }case


        $CONFIG_MEMBER_LINK['manage-pending-property']: {
                include_once SITE_MODULE_DIR.'/member/functions/manage-property-functions.php';
                include "manage-pending-property.php";
                break;
        }case
        $CONFIG_MEMBER_LINK['manage-favourite-property']: {
                include_once SITE_MODULE_DIR.'/member/functions/manage-property-functions.php';
                include "manage-favourite-property.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['update-profile']: {
                include "member_update_profile.php";
                break;
        }case

       $CONFIG_MEMBER_LINK['inbox']: {
                include "member_inbox.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['sent']: {
                include "member_sent.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['send']: {
                include "member_send.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['read']: {
                include "member_read.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['reply']: {
                include "member_reply.php";
                break;
        }case




        $CONFIG_MEMBER_LINK['forward']: {
                include "member_forward.php";
                break;
        }case


        $CONFIG_MEMBER_LINK['change-password']: {
                include "member_change_password.php";
                break;
        }case

        $CONFIG_MEMBER_LINK['view-profile']: {
                include "member_view_profile.php";
                break;
        }default: {
                unset($_SESSION['mem_property_id']);
                include "member_inbox.php";
                break;
            }
    }
}else {
    include "member_login.php";
}

?>